package ch.ricosoft.hr;

public class Team {
	public Team(String name) {
		this.name = name;
	}

	private final String name;
	private int homeWin;
	private int homeLoss;
	private int homeDraw;

	private int outwardWin;
	private int outwardLoss;
	private int outwardDraw;

	private int homeMade;
	private int homeGotten;

	private int outwardMade;
	private int outwardGotten;

	public void addHome(int made, int gotten) {
		homeMade += made;
		homeGotten += gotten;

		if (made > gotten)
			homeWin++;
		if (made < gotten)
			homeLoss++;
		if (made == gotten)
			homeDraw++;
	}

	public void addOutward(int made, int gotten) {
		outwardMade += made;
		outwardGotten += gotten;

		if (made > gotten)
			outwardWin++;
		if (made < gotten)
			outwardLoss++;
		if (made == gotten)
			outwardDraw++;
	}

	public String getName() {
		return name;
	}

	public int getHomePoints() {
		return homeWin * 2 + homeDraw;
	}

	public int getHomeLossPoints() {
		return homeLoss * 2 + homeDraw;
	}

	public int getHomeDiff() {
		return homeMade - homeGotten;
	}

	public int getHomeWin() {
		return homeWin;
	}

	public int getHomeLoss() {
		return homeLoss;
	}

	public int getHomeDraw() {
		return homeDraw;
	}

	public int getOutwardPoints() {
		return outwardWin * 2 + outwardDraw;
	}

	public int getOutwardLossPoints() {
		return outwardLoss * 2 + outwardDraw;
	}

	public int getOutwardDiff() {
		return outwardMade - outwardGotten;
	}

	public int getOutwardWin() {
		return outwardWin;
	}

	public int getOutwardLoss() {
		return outwardLoss;
	}

	public int getOutwardDraw() {
		return outwardDraw;
	}

	public int getHomeMade() {
		return homeMade;
	}

	public int getHomeGotten() {
		return homeGotten;
	}

	public int getOutwardMade() {
		return outwardMade;
	}

	public int getOutwardGotten() {
		return outwardGotten;
	}

}